HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
#include "pxr/pxr.h"
#include "pxr/base/arch/api.h"
#include "pxr/base/arch/defines.h"
#include "pxr/base/arch/inttypes.h"
#include <memory>
#include <cstdio>
#include <string>
#include <set>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
+ Include dependency graph for fileSystem.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Arch_Unmapper
 

Macros

#define ARCH_GLOB_NOCHECK   GLOB_NOCHECK
 
#define ARCH_GLOB_MARK   GLOB_MARK
 
#define ARCH_GLOB_NOSORT   GLOB_NOSORT
 
#define ARCH_GLOB_DEFAULT   (ARCH_GLOB_NOCHECK | ARCH_GLOB_MARK)
 
#define ARCH_PATH_MAX   1024
 
#define ARCH_PATH_SEP   "/"
 
#define ARCH_PATH_LIST_SEP   ":"
 
#define ARCH_REL_PATH_IDENT   "./"
 
#define ArchChmod(path, mode)   chmod(path, mode)
 
#define ArchCloseFile(fd)   close(fd)
 
#define ArchUnlinkFile(path)   unlink(path)
 
#define ArchFileAccess(path, mode)   access(path, mode)
 
#define ArchFdOpen(fd, mode)   fdopen(fd, mode)
 
#define ArchFileNo(stream)   fileno(stream)
 
#define ArchFileIsaTTY(stream)   isatty(stream)
 
#define ArchRmDir(path)   rmdir(path)
 

Typedefs

typedef struct stat ArchStatType
 
using ArchConstFileMapping = std::unique_ptr< char const, Arch_Unmapper >
 
using ArchMutableFileMapping = std::unique_ptr< char, Arch_Unmapper >
 

Enumerations

enum  ArchMemAdvice { ArchMemAdviceNormal, ArchMemAdviceWillNeed, ArchMemAdviceDontNeed, ArchMemAdviceRandomAccess }
 
enum  ArchFileAdvice { ArchFileAdviceNormal, ArchFileAdviceWillNeed, ArchFileAdviceDontNeed, ArchFileAdviceRandomAccess }
 

Functions

ARCH_API FILE * ArchOpenFile (char const *fileName, char const *mode)
 
ARCH_API int64_t ArchGetFileLength (const char *fileName)
 
ARCH_API int64_t ArchGetFileLength (FILE *file)
 
ARCH_API std::string ArchGetFileName (FILE *file)
 
ARCH_API bool ArchStatIsWritable (const ArchStatType *st)
 
ARCH_API bool ArchGetModificationTime (const char *pathname, double *time)
 
ARCH_API double ArchGetModificationTime (const ArchStatType &st)
 
ARCH_API std::string ArchNormPath (const std::string &path, bool stripDriveSpecifier=false)
 
ARCH_API std::string ArchAbsPath (const std::string &path)
 
ARCH_API bool ArchGetStatMode (const char *pathname, int *mode)
 
ARCH_API const char * ArchGetTmpDir ()
 
ARCH_API std::string ArchMakeTmpFileName (const std::string &prefix, const std::string &suffix=std::string())
 
ARCH_API int ArchMakeTmpFile (const std::string &prefix, std::string *pathname=0)
 
ARCH_API int ArchMakeTmpFile (const std::string &tmpdir, const std::string &prefix, std::string *pathname=0)
 
ARCH_API std::string ArchMakeTmpSubdir (const std::string &tmpdir, const std::string &prefix)
 
size_t ArchGetFileMappingLength (ArchConstFileMapping const &m)
 Return the length of an ArchConstFileMapping. More...
 
size_t ArchGetFileMappingLength (ArchMutableFileMapping const &m)
 Return the length of an ArchMutableFileMapping. More...
 
ARCH_API ArchConstFileMapping ArchMapFileReadOnly (FILE *file, std::string *errMsg=nullptr)
 
ARCH_API ArchConstFileMapping ArchMapFileReadOnly (std::string const &path, std::string *errMsg=nullptr)
 
ARCH_API ArchMutableFileMapping ArchMapFileReadWrite (FILE *file, std::string *errMsg=nullptr)
 
ARCH_API ArchMutableFileMapping ArchMapFileReadWrite (std::string const &path, std::string *errMsg=nullptr)
 
ARCH_API void ArchMemAdvise (void const *addr, size_t len, ArchMemAdvice adv)
 
ARCH_API bool ArchQueryMappedMemoryResidency (void const *addr, size_t len, unsigned char *pageMap)
 
ARCH_API int64_t ArchPRead (FILE *file, void *buffer, size_t count, int64_t offset)
 
ARCH_API int64_t ArchPWrite (FILE *file, void const *bytes, size_t count, int64_t offset)
 
ARCH_API std::string ArchReadLink (const char *path)
 
ARCH_API void ArchFileAdvise (FILE *file, int64_t offset, size_t count, ArchFileAdvice adv)
 

Detailed Description

Architecture dependent file system access

Definition in file fileSystem.h.