12 #ifndef ROOT_TAlienSystem 13 #define ROOT_TAlienSystem 35 TAlienSystem(
const char *
name =
"Generic",
const char *title =
"Generic System");
56 virtual int Rename(
const char *from,
const char *to);
57 virtual int Link(
const char *from,
const char *to);
58 virtual int Symlink(
const char *from,
const char *to);
59 virtual int Unlink(
const char *name);
char fWorkingDirectory[1024]
virtual UserGroup_t * GetGroupInfo(Int_t gid)
Returns all group info in the UserGroup_t structure.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual int Utime(const char *file, Long_t modtime, Long_t actime)
Set the a files modification and access times.
virtual Int_t GetEffectiveGid()
Returns the effective group id.
virtual int Umask(Int_t mask)
Set the process file creation mode mask.
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual int AlienFilestat(const char *fpath, FileStat_t &buf)
Get info about a file.
#define ClassDef(name, id)
Bool_t cd(const char *path)
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
virtual int Rename(const char *from, const char *to)
Rename a file.
virtual void FreeDirectory(void *dirp)
Free a directory.
virtual Bool_t Init()
Initialize the OS interface.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
virtual Int_t GetEffectiveUid()
Returns the effective user id.
TAlienSystem(const char *name="Generic", const char *title="Generic System")
Create a new OS interface.
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual Int_t GetGid(const char *group=0)
Returns the group's id. If group = 0, returns current user's group.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * FindFile(const char *search, TString &file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual Int_t GetUid(const char *user=0)
Returns the user's id. If user = 0, returns current user's id.
virtual void * GetDirPtr() const
virtual int Link(const char *from, const char *to)
Create a link from file1 to file2.
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
virtual ~TAlienSystem()
Delete the OS interface.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual int MakeDirectory(const char *name)
Make a directory.
Abstract base class defining a generic interface to the underlying Operating System.
virtual int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree)
Get info about a file system: fs type, block size, number of blocks, number of free blocks...
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual const char * WorkingDirectory()
Return working directory.