Git Product home page Git Product logo

Comments (4)

modeswitch avatar modeswitch commented on July 3, 2024

Can you give an example of why you would want to do this?

from filer.

andrewkoung avatar andrewkoung commented on July 3, 2024

Created this issue on behalf of @humphd, but I'm currently trying to implement lchown(). Though I'm trying to get the metadata for a symbolic link, currently the find_node() method will try to de-reference and get the metadata for a regular link.

from filer.

modeswitch avatar modeswitch commented on July 3, 2024

My preference is to add a new function find_symlink_node instead of adding logic to find_node. Adding new functionality to find_node will make it more difficult to comprehend (it's already difficult) and more difficult to reason about when debugging. In this case I think two comprehensible functions is better than one function that tries to be too clever. You also have the benefit of making your improvements without disturbing other code that relies on find_node.

Have a look at the code for lstat; It also operates on symlinks. You can probably lift that logic out into file_symlink_node and rewrite lstat to use it as well.

from filer.

humphd avatar humphd commented on July 3, 2024

Good idea. Morphed this to be about adding a new function for the non-dereferencing case.

from filer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.