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