java - What makes a file into a folder? -


What is the difference between file and folder (file system specific)?

Why are there different ways in java.nio.file.files to create one or the other? createDirectory (..) and createFile (..) . Use the path as a handle / identifier for both file system objects.

Should I think specifically to create one or the other as a matter of failure to build one or the other)?

To create a file or folder, if there is already a file or folder with the same name, then this is a failure case. If this is going to be an R / W file or folder, then the folder is writable in case it means that the files can be created in it and in the case of the file it means to write the bytes - how is it the difference?

There is really no difference in the case of failure, so I want to separate a custom FileSystemObject and treat them all.

Good question.

In most common operating systems (Windows, Linux, etc.), things may include things in a folder. There are names of those things that each object can be either a file or a directory.

So you may have some folders, which has the following:

  abdcdd   

one And b are the files c and d are folders in a and b Data may be included, but there may be other files / folders in c and D .

For example c can look like this:

  another file de morestuff de stuff   < P> This allows you to create a hierarchy as deep as structured, though you want it is a very basic example of data structure. It is useful to choose whether you are creating files or folders because there are different types of files and folders. In a file system there are such files that are also folders, but I have never seen any such file system. For example, if you create a file in Windows / Linux, you can not use it as a folder, you can only change the contents of the file (which is just arbitrary binary data).   

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -