2 copyright: Steve Dekorte, 2006. All rights reserved.
3 license: See _BSDLicense.txt.
6 // internally, Io always uses a forward slash "/" for path separators,
7 // but on Windows, back slashes are also tolerated as path separators.
8 #if defined(DOS) || defined(ON_WINDOWS)
9 #define OS_PATH_SEPARATOR "\\"
10 #define IO_PATH_SEPARATORS "\\/"
12 #define OS_PATH_SEPARATOR "/"
13 #define IO_PATH_SEPARATORS "/"
16 #define IO_PATH_SEPARATOR "/"
17 #define IO_PATH_SEPARATOR_DOT "."
21 #define IS_PATH_SEPERATOR(ch) ((ch == '/') || (ch == '\\'))
23 #define IS_PATH_SEPERATOR(ch) (ch == '/')
27 BASEKIT_API
void UArray_appendPath_(UArray
*self
, const UArray
*path
);
31 BASEKIT_API
void UArray_removeLastPathComponent(UArray
*self
);
32 BASEKIT_API
void UArray_clipBeforeLastPathComponent(UArray
*self
);
33 BASEKIT_API
long UArray_findLastPathComponent(const UArray
*self
);
34 BASEKIT_API UArray
*UArray_lastPathComponent(const UArray
*self
);
38 BASEKIT_API
long UArray_findPathExtension(UArray
*self
);
39 BASEKIT_API
void UArray_removePathExtension(UArray
*self
);
40 BASEKIT_API UArray
*UArray_pathExtension(UArray
*self
);
44 BASEKIT_API UArray
*UArray_fileName(UArray
*self
);
46 // to/from os path - always returns a copy
48 BASEKIT_API
int UArray_OSPathSeparatorIsUnixSeparator(void);
49 BASEKIT_API UArray
*UArray_asOSPath(UArray
*self
);
50 BASEKIT_API UArray
*UArray_asUnixPath(UArray
*self
);