eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FileOperation':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: FileOperation


Inheritance:

   Object
   |
   +--FileOperation
      |
      +--FileOperation::Copy
      |
      +--FileOperation::Create
      |
      +--FileOperation::Delete
      |
      +--FileOperation::Move
      |
      +--FileOperation::Rename

Package:
stx:libtool
Category:
Interface-Support
Version:
rev: 1.127 date: 2024/03/26 13:09:14
user: cg
file: FileOperation.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


file operations which may run in the background

CopyCorrupt:
    tries to skip over bad sectors in the input file, by skipping them and
    writing them as zeros. Used for partial recovering of old disks and tapes.

Erase:
    fill file with zeros (to be really erased from the disk) before removing.
    We use this, if the file contains security relevant data (such as crypto-keys)

[instance variables:]
    actionForAll .......... a 3-state (true/false/nil) flag, which controls if the current
                            action should be performed for all remaining files
                            (i.e. if deleting, and 'Same for all' was checked, and deletion was confirmed,
                             the remaining files are also deleted without asking again).
                            If nil, the operation will ask again for the next file.

    result ................ boolean outcome                            

  In Create:        
    createdFile ........... name of created file/directory (name as given by user)                            
    
[class variables:]

copyright

COPYRIGHT (c) 2003 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

defaults
o  suffixForCopyOverExistingFile

instance creation
o  copyCorruptedFile: aSourceFile to: aDestFile

o  copyFile: aSourceFile to: aDestFile withOverWriteWarning: overWriteWarningBoolean copyFileIfSame: copyIfSameBoolean

o  copyFiles: aColOfSourceFiles to: aDirectory

o  createDirectoryIn: aDirectory

o  createDirectoryIn: aDirectory initialAnswer: defaultAnswer

o  createFileIn: aDirectory

o  createHardLinkIn: dir

o  createLinkIn: dir soft: soft

o  createSoftLinkIn: dir

o  deleteFiles: colOfFiles confirm: confirm

o  eraseFiles: colOfFiles confirm: confirm

o  moveFile: aSourceFile to: aDestFile

o  moveFiles: aCollectionOfFiles to: aDestDirectory

o  new
(comment from inherited method)
return an instance of myself without indexed variables

o  renameFile: filename to: newFileString

o  renameFiles: aCollectionofFilenames

queries
o  isAbstract
(comment from inherited method)
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine this again.


Instance protocol:

accessing
o  errorString

o  errorString: something

o  result

o  result: aBoolean
Modified (format): / 30-11-2017 / 14:18:02 / cg

dialogs & helpers
o  checkDirectoryExists: aDirectory

o  fileExistsDialogForNewFile: newFile oldFile: oldFile withCancel: withCancel
return true, if the file should be moved/copied.
Ask user if oldFile exists.

o  fileExistsDialogForNewFile: newFile oldFile: oldFile withCancel: withCancel withRemoveIfSame: withRemoveIfSame
return true, if the file should be moved/copied.
If oldFile exists, ask user.
If withRemoveIfSame is true, two additional possible values are returned:
#removeSource and #removeDestination.

o  fileExistsDialogForNewFile: newFile oldFile: oldFile withCancel: withCancel withRemoveIfSame: withRemoveIfSame withAllAction: withAllAction
return true, if the file should be moved/copied.
If oldFile exists, ask user.
If withRemoveIfSame is true, two additional possible values are returned:
#removeSource and #removeDestination.

initialization
o  initialize
(comment from inherited method)
just to ignore initialize to objects which do not need it

queries
o  isErase


Private classes:

    Copy
    CopyCorrupted
    Create
    Delete
    Erase
    Move
    Rename


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 15:36:39 GMT