poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] redoxfs.pk: Pickle for RedoxFS file system


From: Jose E. Marchesi
Subject: Re: [RFC] redoxfs.pk: Pickle for RedoxFS file system
Date: Sat, 19 Dec 2020 07:30:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> On Fri, Dec 18, 2020 at 06:02:01PM +0100, Jose E. Marchesi wrote:
>> 
>> >     method isdir = int:
>> >       {
>> >         return (mode & RedoxFS_MODE_DIR) == RedoxFS_MODE_DIR;
>> >       }
>> >     method isfile = int:
>> >       {
>> >         return (mode & RedoxFS_MODE_FILE) == RedoxFS_MODE_FILE;
>> >       }
>> >     method issymlink = int:
>> >       {
>> >         return (mode & RedoxFS_MODE_SYMLINK) == RedoxFS_MODE_SYMLINK;
>> >       }
>> 
>> Aren't the DIR and FILE flags exclusive?  In that case, the isdir and
>> isfile methods can be simplified like:
>> 
>> method isdir = int:
>> {
>>   return mode & RedoxFS_MODE_DIR;
>> }
>
>
> Yes.
>
>
>> 
>> I assume you can have symlinks to both files and directories in that
>> filesystem...
>
> Symlink is a file that contains the path to the destination. Kind of a
> simple text file.

Oh, so FS_MODE_SYMLINK is also exclusive?
Then the optimization above applies too!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]