Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

How come wrong numbers are never busy?


dovenet / Synchronet Javascript / Moving files between Filebases

SubjectAuthor
* Moving files between FilebasesNightfox
`* Moving files between FilebasesDigital Man
 `* Moving files between FilebasesNightfox
  `* Moving files between FilebasesDigital Man
   `- Moving files between FilebasesNightfox

1
Moving files between Filebases

<61F9AEEA.3545.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=709&group=DOVE-Net.Synchronet_Javascript#709

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: Moving files between Filebases
Message-ID: <61F9AEEA.3545.dove_sync_js@digitaldistortionbbs.com>
Date: Tue, 1 Feb 2022 07:06:34 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.19c-Win32 master/5f2881f28 Feb 1 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220201141713-0800 41e0
WhenExported: 20220201165760-0800 41e0
ExportedFrom: VERT sync-js 3613
WhenImported: 20220201140634-0800 41e0
WhenExported: 20220201141709-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3545
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Tue, 1 Feb 2022 15:06 UTC

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

Moving files between Filebases

<61F9DA50.3614.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=710&group=DOVE-Net.Synchronet_Javascript#710

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: Moving files between Filebases
Message-ID: <61F9DA50.3614.sync-js@vert.synchro.net>
Date: Tue, 1 Feb 2022 10:11:44 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F9AEEA.3545.dove_sync_js@digitaldistortionbbs.com>
References: <61F9AEEA.3545.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Win32 master/735f9ac88 Jan 31 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220201171144-0800 41e0
WhenExported: 20220201225761-0800 41e0
ExportedFrom: VERT sync-js 3614
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Tue, 1 Feb 2022 18:11 UTC

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

Moving files between Filebases

<61F9E9D6.3548.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=711&group=DOVE-Net.Synchronet_Javascript#711

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: Moving files between Filebases
Message-ID: <61F9E9D6.3548.dove_sync_js@digitaldistortionbbs.com>
Date: Tue, 1 Feb 2022 11:17:58 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F9DA50.3614.sync-js@vert.synchro.net>
References: <61F9DA50.3614.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/5f2881f28 Feb 1 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220201184717-0800 41e0
WhenExported: 20220201225761-0800 41e0
ExportedFrom: VERT sync-js 3616
WhenImported: 20220201181758-0800 41e0
WhenExported: 20220201184710-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3548
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Tue, 1 Feb 2022 19:17 UTC

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

Moving files between Filebases

<61F9F758.3617.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=712&group=DOVE-Net.Synchronet_Javascript#712

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: Moving files between Filebases
Message-ID: <61F9F758.3617.sync-js@vert.synchro.net>
Date: Tue, 1 Feb 2022 12:15:36 -0800
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F9E9D6.3548.dove_sync_js@digitaldistortionbbs.com>
References: <61F9E9D6.3548.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Win32 master/735f9ac88 Jan 31 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220201191536-0800 41e0
WhenExported: 20220201225761-0800 41e0
ExportedFrom: VERT sync-js 3617
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Tue, 1 Feb 2022 20:15 UTC

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

Moving files between Filebases

<61F9F82C.3550.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=713&group=DOVE-Net.Synchronet_Javascript#713

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: Moving files between Filebases
Message-ID: <61F9F82C.3550.dove_sync_js@digitaldistortionbbs.com>
Date: Tue, 1 Feb 2022 12:19:08 -0800
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61F9F758.3617.sync-js@vert.synchro.net>
References: <61F9F758.3617.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/5f2881f28 Feb 1 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220201194712-0800 41e0
WhenExported: 20220201225761-0800 41e0
ExportedFrom: VERT sync-js 3618
WhenImported: 20220201191908-0800 41e0
WhenExported: 20220201194710-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3550
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Tue, 1 Feb 2022 20:19 UTC

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

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor