36 :
TNamed(filename, dirname)
56 flags =
id = size = modtime = 0;
82 if (!strcmp(ed,
"vi"))
83 snprintf(cmd,nch,
"xterm -e vi %s &",
GetName());
85 snprintf(cmd,nch,
"%s %s &", ed,
GetName());
90 snprintf(cmd,nch,
"start %s %s", ed,
GetName());
114 Warning(
"Copy",
"File %s already exists", name.
Data());
115 }
else if (status == -1) {
116 Warning(
"Copy",
"Failed to move file %s", name.
Data());
126 Warning(
"Move",
"No file/dir name specified");
142 }
else if (status == -2) {
143 Warning(
"Move",
"File %s already exists", name.
Data());
144 }
else if (status == -1) {
145 Warning(
"Move",
"Failed to move file %s", name.
Data());
virtual void Inspect() const
inspect this file
virtual ~TSystemFile()
Delete TSystemFile object.
virtual void Move(const char *to)
move this 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.
static const char * filename()
void ExecuteDefaultAction(TObject *obj)
Execute default action for selected object (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file).
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual int Rename(const char *from, const char *to)
Rename a file.
virtual void Copy(const char *to)
copy this file
const char * Data() const
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual void Rename(const char *name)
rename this file
The TNamed class is the base class for all named ROOT classes.
Using a TBrowser one can browse all ROOT objects.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
ClassImp(TSystemFile) TSystemFile
TSystemFile default constructor.
R__EXTERN TSystem * gSystem
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual void Delete()
delete this file
virtual void Dump() const
dump this file
virtual const char * GetName() const
Returns name of object.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual Bool_t IsDirectory(const char *dir=0) const
Check if object is a directory.
virtual void Browse(TBrowser *b)
Execute default action for this system file (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file.
A TSystemFile describes an operating system file.
virtual void Edit()
Invoke text editor on this file.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.