FileXtra401.pdf

(309 KB) Pobierz
301808944 UNPDF
FileXtra4
version 4.0.1
Copyright (c) 1996-2002 by Kent Kersten
A free add-on for Director Lingo Programmers
Table of Contents
Contact Info................................................................................................................................................... 4
Target Platforms............................................................................................................................................. 4
How To Report Bugs ...................................................................................................................................... 4
Background.................................................................................................................................................... 5
New Features & Changes in v4.0................................................................................................................ 6
Bugs Fixed in v4.0.1........................................................................................................................................ 7
Bugs Fixed in v4.0........................................................................................................................................... 7
Cross-Platform Information........................................................................................................................... 8
Path Specification.....................................................................................................................................................8
How To Use The Xtra...................................................................................................................................... 9
Informational Methods ............................................................................................................................... 10
fx_GetVersion ......................................................................................................................................................... 11
File Methods ................................................................................................................................................. 12
fx_FileOpenDialog.................................................................................................................................................. 13
fx_FileSaveAsDialog ............................................................................................................................................... 16
fx_FileExists ............................................................................................................................................................... 18
fx_FileIsLink............................................................................................................................................................... 19
fx_FileRename ........................................................................................................................................................ 20
fx_FileDelete............................................................................................................................................................ 21
fx_FileRecycle ......................................................................................................................................................... 23
fx_FileCopy.............................................................................................................................................................. 24
fx_FileMove ............................................................................................................................................................. 25
fx_FileGetWriteState............................................................................................................................................... 27
fx_FileSetWriteState................................................................................................................................................ 28
fx_FileGetModDate................................................................................................................................................ 29
fx_FileGetModNumber .......................................................................................................................................... 30
fx_FileGetSize .......................................................................................................................................................... 31
fx_FileGetType ........................................................................................................................................................ 32
fx_FileSetType.......................................................................................................................................................... 34
fx_FileCompare ...................................................................................................................................................... 36
fx_FileOpenDocument .......................................................................................................................................... 37
fx_FilePrintDocument ............................................................................................................................................. 39
fx_FileGetAppPath................................................................................................................................................. 41
fx_FileRunApp ......................................................................................................................................................... 43
Alias/Shortcut Methods .............................................................................................................................. 45
fx_LinkCreate .......................................................................................................................................................... 46
fx_LinkResolve ......................................................................................................................................................... 48
Folder Methods............................................................................................................................................ 49
fx_FolderSelectDialog............................................................................................................................................ 50
fx_FolderGetSpecialPath ...................................................................................................................................... 52
fx_FolderExists.......................................................................................................................................................... 57
fx_FolderCreate...................................................................................................................................................... 58
fx_FolderRename ................................................................................................................................................... 59
fx_FolderDelete ...................................................................................................................................................... 60
fx_FolderRecycle.................................................................................................................................................... 61
fx_FolderCopy ........................................................................................................................................................ 62
fx_FolderMove ........................................................................................................................................................ 64
fx_FolderSyncOneWay .......................................................................................................................................... 66
fx_FolderSyncBothWays ........................................................................................................................................ 68
fx_FolderToList ......................................................................................................................................................... 70
Volume Methods ......................................................................................................................................... 71
fx_VolumeSelectDialog......................................................................................................................................... 72
fx_VolumeExists....................................................................................................................................................... 73
fx_VolumeGetFreeBytes........................................................................................................................................ 74
fx_VolumeGetTotalBytes ....................................................................................................................................... 75
fx_VolumeIsCDROM............................................................................................................................................... 76
fx_VolumeIsRemovable......................................................................................................................................... 77
fx_VolumeEject....................................................................................................................................................... 78
fx_VolumesToList..................................................................................................................................................... 79
Error Reporting Methods............................................................................................................................. 80
fx_ErrorNumber ....................................................................................................................................................... 81
fx_ErrorString............................................................................................................................................................ 82
FileXtra4
- 2 -
Appendix A. Complete Listing of Error Codes ....................................................................................... 84
FileXtra4
- 3 -
Contact Info
FileXtra4 and its documentation are copyright (c) 1996-2002 by Kent Kersten. All rights reserved
worldwide.
Contact the author at kent@kblab.net .
The most current versions of my xtras will be at http://www.kblab.net/xtras .
FileXtra4 is provided on an “as-is” basis, which basically means I assume no responsibility for how
it is used and have no liability if it does not suit your needs.
Target Platforms
FileXtra4 is designed to run on Macromedia Director versions 6 and newer for both the Power
Macintosh using System 8.1 or newer and Windows using Windows 98, 98 SE, Me; NT 4, Windows
2000 or XP. Windows 95 is not supported.
Windows NT users should have the latest Service Pack installed. This guarantees current enough
versions of critical system DLL’s are present for certain methods to work properly.
Version 4 will be the last version that supports Mac OS 8 & 9.
Version 4 will be the last version that supports Windows 98, Me or NT 4.
Note that FileXtra4 is very definitely NOT Shockwave-safe! Its ability to write information to
permanent storage via some of its method calls means that it cannot be considered safe and is
not packaged that way.
How To Report Bugs
Send an email to the author at kent@kblab.net . PLEASE provide the following information:
! the platform (Mac, PC, both)
! Director version
! OS version
! how much RAM you’ve got
! any error codes returned by FileXtra4 methods.
Code snippets can be helpful, but don’t expect me to write or debug your application for you.
FileXtra4
- 4 -
Background
FileXtra4 is a no-cost, cross-platform Lingo scripting Xtra for Macromedia Director versions 6 and
newer. You are free to use it in your projects and products at absolutely no cost. The only
stipulation I would place on you is that if you share the xtra with someone who is a developer,
please give them the documentation as well.
The first version of the Xtra was called FileUtil and was released in 1996, soon after the release of
Director v5. I wrote the original version because I had migrated a commercial children’s
education application from Director 4 to v5 to take advantage of the spiffy new features and
Windows 95’s better memory management.
However upon performing this migration, I realized that some of the”XObjects” that worked with
Director 4 did not work with v5. This in effect crippled the application I was coding by taking
away certain functionality that only the XObjects provided.
So I madly scrambled to try and learn how to create these new extensions called “Xtras.”
Macromedia provided a developer’s kit along with some example code. A few weeks later I
produced FileUtil. At the time there were very few Xtras available. A west coast company
contacted me and asked if I would be interested in letting them resell the xtra, which I agreed to
on a non-exclusive basis.
After a few months I decided to pull the plug on this arrangement as it was inconvenient and
costly to users. I was more interested in granting free access to my xtras so that they could be
used by anyone that needed the functionality.
Another reason is that when I started Director programming with version 4, there were many
freely-available XObjects to help developers like myself produce useful products. It became
more important to give something back to the community that helped me than to make a few
dollars.
So I added some functionality and changed the name to FileXtra, and made it freely available
to anyone that needed it. According to the emails that I have received, it has been helpful to
many other developers in many other countries as well as here in the U.S. So I hope that if you
are a new user you will find it useful also.
FileXtra4
- 5 -
Zgłoś jeśli naruszono regulamin