1 //===-- Path.cpp - Implement OS Path Concept --------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Reid Spencer and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This header file implements the operating system Path concept.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/System/Path.h"
19 //===----------------------------------------------------------------------===//
20 //=== WARNING: Implementation here must contain only TRULY operating system
21 //=== independent code.
22 //===----------------------------------------------------------------------===//
25 Path::is_file() const {
26 return (is_valid() && path[path.length()-1] != '/');
30 Path::is_directory() const {
31 return (is_valid() && path[path.length()-1] == '/');
36 // Include the truly platform-specific parts of this class.
37 #include "platform/Path.cpp"