-
Moving files between Filebases
From
Nightfox@VERT/DIGDIST to
Digital Man on Tue Feb 1 14:06:34 2022
Hi DM,ããIf one wanted to move a file from one Filebase to another, I don't see a specific function in the JS object model documentation for doing so. Would this be the correct way?ãã1. Get the file's metadata object using FileBase.get(filename,ãFileBase.DETAIL.EXTENDED)ãã2. Remove the file from the FileBase using FileBase.remove(filename, false)ãã3. Move the file to the other filebase directory, open that filebase, and use FileBase.Add(meta-data object)ãããI'm wondering if this will preserve stats such as the total number of downloads for the file, etc.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Tue Feb 1 17:11:44 2022
Re: Moving files between Filebasesã By: Nightfox to Digital Man on Tue Feb 01 2022 02:06 pmãã > Hi DM,ã >ã > If one wanted to move a file from one Filebase to another, I don't see aã > specific function in the JS object model documentation for doing so. Wouldã > this be the correct way?ã >ã > 1. Get the file's metadata object using FileBase.get(filename,ã > FileBase.DETAIL.EXTENDED)ã >ã > 2. Remove the file from the FileBase using FileBase.remove(filename, false)ã >ã > 3. Move the file to the other filebase directory, open that filebase, andã > use FileBase.Add(meta-data object)ã >ã >ã > I'm wondering if this will preserve stats such as the total number ofã > downloads for the file, etc.ããI think that would work, but it would *not* retain the last_downloaded/times_downloaded (and some other stats) property values of the file. :-(ããThis was an oversight on my part. I can fix that for a future release, but it's too late for v3.19b.ã-- ã digital man (rob)ããSynchronet "Real Fact" #41:ãSynchronet's cross-platform library is called XPDEV (named before Windows XP)ãNorco, CA WX: 57.5øF, 68.0% humidity, 5 mph SSW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Tue Feb 1 18:17:58 2022
Re: Moving files between Filebasesã By: Digital Man to Nightfox on Tue Feb 01 2022 05:11 pmãã >> If one wanted to move a file from one Filebase to another, I don't seeã >> a specific function in the JS object model documentation for doing so.ã >> Would this be the correct way?ãã >> 1. Get the file's metadata object using FileBase.get(filename,ã >> FileBase.DETAIL.EXTENDED)ãã >> 2. Remove the file from the FileBase using FileBase.remove(filename,ã >> false) ãã >> 3. Move the file to the other filebase directory, open that filebase,ã >> and use FileBase.Add(meta-data object)ããã DM> I think that would work, but it would *not* retain theã DM> last_downloaded/times_downloaded (and some other stats) property values ofã DM> the file. :-( ãã DM> This was an oversight on my part. I can fix that for a future release, butã DM> it's too late for v3.19b.ããI think that would be useful to have. As I've been working on my file lister, I've implemented a sysop action to move a file from one FileBase to another and have implemented it as above for now.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Tue Feb 1 19:15:36 2022
Re: Moving files between Filebasesã By: Nightfox to Digital Man on Tue Feb 01 2022 06:17 pmãã > Re: Moving files between Filebasesã > By: Digital Man to Nightfox on Tue Feb 01 2022 05:11 pmã >ã > >> If one wanted to move a file from one Filebase to another, I don't seeã > >> a specific function in the JS object model documentation for doing so.ã > >> Would this be the correct way?ã >ã > >> 1. Get the file's metadata object using FileBase.get(filename,ã > >> FileBase.DETAIL.EXTENDED)ã >ã > >> 2. Remove the file from the FileBase using FileBase.remove(filename,ã > >> false)ã >ã > >> 3. Move the file to the other filebase directory, open that filebase,ã > >> and use FileBase.Add(meta-data object)ã >ã >ã > DM> I think that would work, but it would *not* retain theã > DM> last_downloaded/times_downloaded (and some other stats) property valuesã > DM> of the file. :-(ã >ã > DM> This was an oversight on my part. I can fix that for a future release,ã > DM> but it's too late for v3.19b.ã >ã > I think that would be useful to have. As I've been working on my fileã > lister, I've implemented a sysop action to move a file from one FileBase toã > another and have implemented it as above for now.ããDoes that action work as expected (save for those 3 'stats' properties)?ã-- ã digital man (rob)ããSynchronet "Real Fact" #2:ãSynchronet version 2 for DOS and OS/2 was released to the public domain in 1997ãNorco, CA WX: 53.5øF, 81.0% humidity, 0 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Tue Feb 1 19:19:08 2022
Re: Moving files between Filebasesã By: Digital Man to Nightfox on Tue Feb 01 2022 07:15 pmãã > >>> 1. Get the file's metadata object using FileBase.get(filename,ã > >>> FileBase.DETAIL.EXTENDED)ãã > >>> 2. Remove the file from the FileBase usingã > >>> FileBase.remove(filename, false)ãã > >>> 3. Move the file to the other filebase directory, open thatã > >>> filebase, and use FileBase.Add(meta-data object)ãã >> I think that would be useful to have. As I've been working on my fileã >> lister, I've implemented a sysop action to move a file from oneã >> FileBase to another and have implemented it as above for now.ãã DM> Does that action work as expected (save for those 3 'stats' properties)?ããYes, it does appear to work as expected.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã