FileOperation.st
changeset 4674 64a49fadc47e
parent 4665 cd7e02bf5d85
child 4701 b30d103a8bc9
equal deleted inserted replaced
4673:2d4f10bb5fa6 4674:64a49fadc47e
   194 ! !
   194 ! !
   195 
   195 
   196 !FileOperation::Copy class methodsFor:'documentation'!
   196 !FileOperation::Copy class methodsFor:'documentation'!
   197 
   197 
   198 version
   198 version
   199     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.28 2003-03-16 12:47:56 cg Exp $'
   199     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.29 2003-03-18 11:26:45 cg Exp $'
   200 ! !
   200 ! !
   201 
   201 
   202 !FileOperation::Copy methodsFor:'accessing'!
   202 !FileOperation::Copy methodsFor:'accessing'!
   203 
   203 
   204 colOfCopiedFiles
   204 colOfCopiedFiles
   398 ! !
   398 ! !
   399 
   399 
   400 !FileOperation::Create class methodsFor:'documentation'!
   400 !FileOperation::Create class methodsFor:'documentation'!
   401 
   401 
   402 version
   402 version
   403     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.28 2003-03-16 12:47:56 cg Exp $'
   403     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.29 2003-03-18 11:26:45 cg Exp $'
   404 ! !
   404 ! !
   405 
   405 
   406 !FileOperation::Create methodsFor:'accessing'!
   406 !FileOperation::Create methodsFor:'accessing'!
   407 
   407 
   408 createdFile
   408 createdFile
   644 ! !
   644 ! !
   645 
   645 
   646 !FileOperation::Delete class methodsFor:'documentation'!
   646 !FileOperation::Delete class methodsFor:'documentation'!
   647 
   647 
   648 version
   648 version
   649     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.28 2003-03-16 12:47:56 cg Exp $'
   649     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.29 2003-03-18 11:26:45 cg Exp $'
   650 ! !
   650 ! !
   651 
   651 
   652 !FileOperation::Delete methodsFor:'actions'!
   652 !FileOperation::Delete methodsFor:'actions'!
   653 
   653 
   654 deleteFile:aFileOrDirectory
   654 deleteFile:aFileOrDirectory
   814 ! !
   814 ! !
   815 
   815 
   816 !FileOperation::Move class methodsFor:'documentation'!
   816 !FileOperation::Move class methodsFor:'documentation'!
   817 
   817 
   818 version
   818 version
   819     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.28 2003-03-16 12:47:56 cg Exp $'
   819     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.29 2003-03-18 11:26:45 cg Exp $'
   820 ! !
   820 ! !
   821 
   821 
   822 !FileOperation::Move methodsFor:'accessing'!
   822 !FileOperation::Move methodsFor:'accessing'!
   823 
   823 
   824 colOfMovedFiles
   824 colOfMovedFiles
   984 ! !
   984 ! !
   985 
   985 
   986 !FileOperation::Rename class methodsFor:'documentation'!
   986 !FileOperation::Rename class methodsFor:'documentation'!
   987 
   987 
   988 version
   988 version
   989     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.28 2003-03-16 12:47:56 cg Exp $'
   989     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.29 2003-03-18 11:26:45 cg Exp $'
   990 ! !
   990 ! !
   991 
   991 
   992 !FileOperation::Rename methodsFor:'accessing'!
   992 !FileOperation::Rename methodsFor:'accessing'!
   993 
   993 
   994 renamedFiles
   994 renamedFiles
  1017         result := false
  1017         result := false
  1018     ].
  1018     ].
  1019 
  1019 
  1020     old := oldFile.
  1020     old := oldFile.
  1021     new := oldFile directory construct:newName.
  1021     new := oldFile directory construct:newName.
       
  1022 
       
  1023 
       
  1024     old pathName = new pathName ifTrue:[
       
  1025         ^ self.
       
  1026     ].
  1022 
  1027 
  1023     OperatingSystem errorSignal handle:[:ex|
  1028     OperatingSystem errorSignal handle:[:ex|
  1024         msg := ('Cannot rename file ', old baseName,' to ', newName,' !!'), '\\(' ,(OperatingSystem lastErrorString) , ')'.
  1029         msg := ('Cannot rename file ', old baseName,' to ', newName,' !!'), '\\(' ,(OperatingSystem lastErrorString) , ')'.
  1025         Dialog warn:msg withCRs.
  1030         Dialog warn:msg withCRs.
  1026         result := false
  1031         result := false
  1064                     result := true
  1069                     result := true
  1065                 ].
  1070                 ].
  1066                 lastOldName := oldName.
  1071                 lastOldName := oldName.
  1067                 lastNewName := newName
  1072                 lastNewName := newName
  1068             ].
  1073             ].
  1069         queryBox showAtPointer
  1074         queryBox showAtPointer.
  1070     ]
  1075     ]
  1071 ! !
  1076 ! !
  1072 
  1077 
  1073 !FileOperation class methodsFor:'documentation'!
  1078 !FileOperation class methodsFor:'documentation'!
  1074 
  1079 
  1075 version
  1080 version
  1076     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.28 2003-03-16 12:47:56 cg Exp $'
  1081     ^ '$Header: /cvs/stx/stx/libtool/FileOperation.st,v 1.29 2003-03-18 11:26:45 cg Exp $'
  1077 ! !
  1082 ! !