--
Charles Francoise
Lead Mac Developer @ Lima
char...@meetlima.com





> On 12 Apr 2016, at 19:24, Jim Luther <luthe...@apple.com> wrote:
> 
> 
>> On Apr 12, 2016, at 10:17 AM, Charles Francoise <char...@meetlima.com> wrote:
>> 
>> Thanks for the answer!
>> 
>>> if a user mounts a network volume, moves files to the trash, unmounts the 
>>> network volume, and never returns to that network volume, files are left in 
>>> the trash forever
>> 
>> This isn’t really an issue, since there is a one user for one volume rule. 
> 
> If it is your filesystem (i.e., the volume is not being mounted by smb, afp, 
> etc), then your file system plugin can set the MNT_LOCAL flag and our code 
> will attempt to create a ".Trashes" directory in the root directory of your 
> volume (so you have to make sure the root user has permission to create 
> directories in the root directory of your volume). If that's successful, 
> that's all that's needed.

This is what we’re already doing, and we’ve had great results. But since this 
is a network filesystem at heart, we’ve noticed a lot of way the Finder “plays 
nice” with network drives: e.g. refreshing the folder contents periodically for 
files being modified from other locations (and not waiting for an FSEvent). Our 
dilemma right now: mount as network drive and hack our way into Trash and 
Spotlight or mount as local drive and hack our way into monitoring file 
modifications.

> 
>> 
>>> The only network locations that still support trash are network home 
>>> directories
>> 
>> This is an option we considered early in the development. I’ll keep that in 
>> mind.
>> 
>> I’ve also noticed that iCloud Drive, upon deletion from the Finder, sends 
>> files to the local Trash and warns the user of what it’s doing. Is this a 
>> behaviour I could implement in my own filesystem?
> 
> Lots of things are special-cased for iCloud Drive.
> 
>> 
>> --
>> Charles Francoise
>> Lead Mac Developer @ Lima
>> char...@meetlima.com
>> 
>> 
>> 
>> 
>> 
>> 
>>> On 12 Apr 2016, at 18:05, Jim Luther <luthe...@apple.com> wrote:
>>> 
>>> Apple doesn't support trash directories (or temporary item directories) on 
>>> network volumes and hasn't for quite a while because there is no good 
>>> mechanism to clean up trash on network volumes (i.e., if a user mounts a 
>>> network volume, moves files to the trash, unmounts the network volume, and 
>>> never returns to that network volume, files are left in the trash forever). 
>>> The only network locations that still support trash are network home 
>>> directories -- in this case, the trash folder is within the network home 
>>> directory so any user quotas can be enforced and documents moved to the 
>>> trash are still within that user's control (no privacy issues).
>>> 
>>> - Jim
>>> 
>>>> On Apr 12, 2016, at 2:38 AM, Charles Francoise <char...@meetlima.com> 
>>>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I’m currently working on a network filesystem that can only be used by one 
>>>> user at any time (similarly to a cloud drive).
>>>> 
>>>> Since only one user manipulates the files at any time, it would be 
>>>> interesting to have a network Trash. Is this something that can be done? 
>>>> Either by exposing a “Trash enabled” capability for the filesystem, or 
>>>> perhaps in the kernel extension for the filesystem?
>>>> 
>>>> Thanks,
>>>> --
>>>> Charles Francoise
>>>> Lead Mac Developer @ Lima
>>>> char...@meetlima.com
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Filesystem-dev mailing list      (Filesystem-dev@lists.apple.com)
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/filesystem-dev/luther.j%40apple.com
>>>> 
>>>> This email sent to luthe...@apple.com
>>> 
>> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (Filesystem-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to