AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
Aws::FileSystem Namespace Reference

Classes

class  Directory
 
 
 

Typedefs

typedef std::function< bool(const DirectoryTree *, const DirectoryEntry &)> DirectoryEntryVisitor
 

Enumerations

enum class  FileType { None , File , Symlink , Directory }
 

Functions

AWS_CORE_API Aws::String GetHomeDirectory ()
 
 
AWS_CORE_API bool CreateDirectoryIfNotExists (const char *path, bool createParentDirs=false)
 Creates directory if it doesn't exist. Returns true if the directory was created or already exists. False for failure.
 
AWS_CORE_API bool RemoveDirectoryIfExists (const char *path)
 
AWS_CORE_API bool RemoveFileIfExists (const char *fileName)
 
AWS_CORE_API bool RelocateFileOrDirectory (const char *from, const char *to)
 
AWS_CORE_API bool DeepCopyDirectory (const char *from, const char *to)
 
AWS_CORE_API bool DeepDeleteDirectory (const char *toDelete)
 
 
AWS_CORE_API Aws::UniquePtr< DirectoryOpenDirectory (const Aws::String &path, const Aws::String &relativePath="")
 
AWS_CORE_API Aws::String Join (const Aws::String &leftSegment, const Aws::String &rightSegment)
 
AWS_CORE_API Aws::String Join (char delimiter, const Aws::String &leftSegment, const Aws::String &rightSegment)
 

Variables

static const char PATH_DELIM = '/'
 

Typedef Documentation

◆ DirectoryEntryVisitor

typedef std::function<bool(const DirectoryTree*, const DirectoryEntry&)> Aws::FileSystem::DirectoryEntryVisitor

Visitor for a Directory Tree traversal. Return true to continue the traversal, false to exit the traversal immediately.

Definition at line 169 of file FileSystem.h.

Enumeration Type Documentation

◆ FileType

strong

Type of directory entry encountered.

Enumerator
None 
File 
Symlink 
Directory 

Definition at line 95 of file FileSystem.h.

Function Documentation

◆ CreateDirectoryIfNotExists()

AWS_CORE_API bool Aws::FileSystem::CreateDirectoryIfNotExists ( const char *  path,
bool  createParentDirs = false 
)

Creates directory if it doesn't exist. Returns true if the directory was created or already exists. False for failure.

Parameters
path,theabsolute path of the directory.
createParentDirs,iftrue, then this function will create missing directories on the path like linux command: mkdir -p

◆ CreateTempFilePath()

AWS_CORE_API Aws::String Aws::FileSystem::CreateTempFilePath ( )

Computes a unique tmp file path

◆ DeepCopyDirectory()

AWS_CORE_API bool Aws::FileSystem::DeepCopyDirectory ( const char *  from,
const char *  to 
)

Copies a directory and all of its contents.

◆ DeepDeleteDirectory()

AWS_CORE_API bool Aws::FileSystem::DeepDeleteDirectory ( const char *  toDelete)

Deletes a directory and all of its contents.

◆ GetExecutableDirectory()

AWS_CORE_API Aws::String Aws::FileSystem::GetExecutableDirectory ( )

Returns the directory path for the directory containing the currently running executable

◆ GetHomeDirectory()

AWS_CORE_API Aws::String Aws::FileSystem::GetHomeDirectory ( )

Returns the directory path for the home dir env variable

◆ Join() [1/2]

AWS_CORE_API Aws::String Aws::FileSystem::Join ( char  delimiter,
const Aws::String leftSegment,
const Aws::String rightSegment 
)

Joins the leftSegment and rightSegment of a path together using the specified delimiter. e.g. with delimiter & C:\users\name\ and .aws becomes C:\users\name&.aws

◆ Join() [2/2]

AWS_CORE_API Aws::String Aws::FileSystem::Join ( const Aws::String leftSegment,
const Aws::String rightSegment 
)

Joins the leftSegment and rightSegment of a path together using platform specific delimiter. e.g. C:\users\name\ and .aws becomes C:\users\name.aws

◆ OpenDirectory()

AWS_CORE_API Aws::UniquePtr< Directory > Aws::FileSystem::OpenDirectory ( const Aws::String path,
const Aws::String relativePath = "" 
)

Opens a directory for traversal.

◆ RelocateFileOrDirectory()

AWS_CORE_API bool Aws::FileSystem::RelocateFileOrDirectory ( const char *  from,
const char *  to 
)

Moves the file. Returns true on success

◆ RemoveDirectoryIfExists()

AWS_CORE_API bool Aws::FileSystem::RemoveDirectoryIfExists ( const char *  path)

Creates directory if it doesn't exist. Returns true if the directory was created or already exists. False for failure.

◆ RemoveFileIfExists()

AWS_CORE_API bool Aws::FileSystem::RemoveFileIfExists ( const char *  fileName)

Deletes file if it exists. Returns true if file doesn't exist or on success.

Variable Documentation

◆ PATH_DELIM

const char Aws::FileSystem::PATH_DELIM = '/'
static

Definition at line 24 of file FileSystem.h.