SLFileSystem provides basic filesystem functions.
More...
#include <Utils_iOS.h>
SLFileSystem provides basic filesystem functions.
Definition at line 16 of file modules/utils/source/Utils_iOS.h.
◆ deleteFile() [1/2]
static bool Utils_iOS::deleteFile |
( |
std::string & |
pathfilename | ) |
|
|
static |
Deletes a file on the filesystem.
◆ deleteFile() [2/2]
bool Utils_iOS::deleteFile |
( |
std::string & |
pathfilename | ) |
|
|
static |
Deletes a file on the filesystem.
Definition at line 133 of file modules/utils/source/Utils_iOS.mm.
136 return remove(pathfilename.c_str()) != 0;
static bool fileExists(std::string &pathfilename)
Returns true if a file exists.
◆ fileExists() [1/2]
static bool Utils_iOS::fileExists |
( |
std::string & |
pathfilename | ) |
|
|
static |
Returns true if a file exists.
◆ fileExists() [2/2]
static bool Utils_iOS::fileExists |
( |
std::string & |
pathfilename | ) |
|
|
static |
Returns true if a file exists.
◆ getAllNamesInDir() [1/2]
static std::vector<std::string> Utils_iOS::getAllNamesInDir |
( |
const std::string & |
dirName | ) |
|
|
static |
Returns all files and folders in a directory as a vector.
◆ getAllNamesInDir() [2/2]
static std::vector<std::string> Utils_iOS::getAllNamesInDir |
( |
const std::string & |
dirName, |
|
|
bool |
fullPath = true |
|
) |
| |
|
static |
Returns all files and folders in a directory as a vector.
◆ getAppsDocumentsDir()
static std::string Utils_iOS::getAppsDocumentsDir |
( |
| ) |
|
|
static |
Returns the writable documents directory.
◆ getAppsWritableDir() [1/2]
static std::string Utils_iOS::getAppsWritableDir |
( |
| ) |
|
|
static |
Returns the writable configuration directory.
◆ getAppsWritableDir() [2/2]
std::string Utils_iOS::getAppsWritableDir |
( |
| ) |
|
|
static |
Returns the writable configuration directory.
Definition at line 102 of file modules/utils/source/Utils_iOS.mm.
105 NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
108 NSString* libraryDirectory = [paths objectAtIndex:0];
109 string configDir = [libraryDirectory UTF8String];
110 configDir +=
"/SLProject";
111 NSString* configPath = [NSString stringWithUTF8String:configDir.c_str()];
115 if (![[NSFileManager defaultManager] fileExistsAtPath:configPath])
116 [[NSFileManager defaultManager] createDirectoryAtPath:configPath
117 withIntermediateDirectories:NO
121 return configDir +
"/";
◆ getCurrentWorkingDir() [1/2]
static std::string Utils_iOS::getCurrentWorkingDir |
( |
| ) |
|
|
static |
Returns the working directory.
◆ getCurrentWorkingDir() [2/2]
std::string Utils_iOS::getCurrentWorkingDir |
( |
| ) |
|
|
static |
Returns the working directory.
Definition at line 124 of file modules/utils/source/Utils_iOS.mm.
128 NSString* bundlePath = [[NSBundle mainBundle] resourcePath];
129 string cwd = [bundlePath UTF8String];
The documentation for this class was generated from the following files: