GB2455983A - Assigning and locating directory names or file names for in a file system - Google Patents

Assigning and locating directory names or file names for in a file system Download PDF

Info

Publication number
GB2455983A
GB2455983A GB0725211A GB0725211A GB2455983A GB 2455983 A GB2455983 A GB 2455983A GB 0725211 A GB0725211 A GB 0725211A GB 0725211 A GB0725211 A GB 0725211A GB 2455983 A GB2455983 A GB 2455983A
Authority
GB
United Kingdom
Prior art keywords
name
directory
original
names
assigning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
GB0725211A
Other versions
GB0725211D0 (en
Inventor
Fares Abdullah
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nokia Oyj
Original Assignee
Nokia Oyj
Symbian Software Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nokia Oyj, Symbian Software Ltd filed Critical Nokia Oyj
Priority to GB0725211A priority Critical patent/GB2455983A/en
Publication of GB0725211D0 publication Critical patent/GB0725211D0/en
Publication of GB2455983A publication Critical patent/GB2455983A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • G06F16/166File name conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A user or a software program requests a new directory with an original name (1). If the original name is greater than a threshold length, a truncated version of the original name forms a first portion (3) of the directory name (2). Otherwise, the original name is used as the first portion. An identifier is assigned as a second portion (4) of the directory name and may ensure that the directory name is unique. Assigning a truncated version of the original name to the directory name enables the original name to be of arbitrary length. A directory name may be located by searching directory names for one or more names which include a truncated version of a requested name. If more than one such directory name is identified, the correct directory name is located by searching the original names associated with the identified directory names. The method may be implemented using an API. It may be used to assign or locate file names.

Description

Method of Asginjnp and Locating a Directory Name
Technical Field
The present invention relates to a method of assigning and locating a directory name associated with data on a digital recording medium.
Background to the Invention and Prior Art
Certain limitations exist in conventional file system implementations such as FATI 6, FAT32, and NTFS. When a user of a file system creates a directory name, a corresponding name is generated by the file system which is used for accessing the directory. The name generated by the file system is not made visible to the user; instead a table is maintained, mapping the user-given directory name onto the name used internally by the file system, such that a user can access the directory indirectly via the user-given name.
Although such file systems tend to permit fairly long directory names, there is in practice a limit imposed by the file system, typically of 256 characters. l'his can make programming more difficult because it introduces the need to check for edge cases (names that are too long), and the checks can reduce the speed with which directories can be accessed. In addition, such file systems do not allow users to create arbitrarily long names.
Summary of the Invention
A first aspect of the invention provides a method of assigning a directory name, the method comprising: receiving an original name; determining whether the original name is greater than a threshold; and if the original name is greater than the threshold, then: assigning a truncated version of the original name as a first portion of the directory name; and assigning an identifier as a second portion of the directory name.
By assigning a truncated version of the original name to the directory name, the invention enables the original name to be long, and potentially of arbitrary length. The use of an identifier ensures that the directory name is unique, in the sense that the complete directory name has not been previously assigned to another directory.
The truncation can involve removing one or more characters from the start of the original name or from the end of the original name. Preferably the last character(s) are removed since this is more intuitive and thus makes programming and debugging easier.
Preferably the method further comprises: if the original name is less than the threshold, then: assigning a full version of the original name as a first portion of the directory name; and assigning a identifier as a second portion of the directory name. Assigning an identifier to the directory name regardless of whether the original name is long or short (compared with the threshold) provides a convenient method of ensuring that the directory name is unique.
The assigned identifier may be generated by any appropriate technique. For example, the identifier could comprise a hash of the original filename; however, a hashing process has the disadvantages that it is computationally expensive and it does not necessarily generate a unique identifier. More preferably the identifier is assigned by incrementally increasing a counter such that each identifier is generated by incrementing the identifier assigned to the previous directory name.
According to different embodiments of the invention, an identifier could either be used only when the first portion of the directory name is not unique, or for all directory names. Similarly, the identifiers assigned to directory names could each be unique, or alternatively identifiers could be re-used if the original directory name is itself unique.
A second aspect of the invention provides a method of locating a directory name, the method comprising; receiving a request including a requested name; searching a plurality of directory names to identify one or more directory names which include a truncated version of the requested name; and in the event of the search identifying more than one directory name, locating the correct directory name by searching the original names associated with the identified directory names.
The method of the second aspect of the invention corresponds directly to the first aspect, but in this case relates to a method of locating a previously assigned directory name. Once the name has been located then the directory can be accessed for editing, deletion or other purposes.
Preferably the plurality of directory names have been assigned by the method of the first aspect of the invention. In this case, then the identifiers may be ignored when the directory names are searched.
The methods of the first and second aspects of the invention may be used to assign or locate a directory name associated with a plurality of files, each file having a different file name but being grouped within the same directory. Alternatively, the methods of the first and second aspects of the invention may be used to assign or locate a file name associated with an individual file. Thus, the term "directory name" is used herein in a general sense to refer to either the name of a directory, or to the name of an individual file within a directory.
Further features and advantages of the present invention will be apparent from the appended claims.
Brief Description of the Drawings
Further features and advantages of the present invention will become apparent from the following detailed description of embodiments thereof, presented by way of example only, and wherein like reference numerals refer to like parts, and wherein: -Figure 1 is a block diagram of the elements of a mobile telecommunications device; Figure 2 describes how a newly requested directory is renamed when it is created; Figure 3 is a flow diagram illustrating the processes required to create a new directory name using the new file system; Figure 4 describes a second searching process which may be required to determine whether the original name of a newly requested directory is unique; and Figure 5 is a flow diagram illustrating the processes required to access or delete a directory created using the method described in Figure 3.
Description of the Preferred Embodiments
Figure 1 is a block diagram of the internal elements of a conventional mobile telecommunications device 20. Here, the mobile telecommunications device 20 comprises RF processor hardware 22, baseband processor hardware 24, and a power regulator 26, all of which deal with the telecommunications operations of the mobile telecommunications device 20, i.e. using telecommunications protocols to make, for example, voice calls, data connections, and the like. The user interface and applications that run on the device are run by the application processor 28, and provides an interface to the telecommunications stack provided by the baseband processor 24. Also typically provided are secondary communication subsystems, such as, for example, Bluetooth subsystem 30. An infrared subsystem may also be provided.
The mobile telecommunications device 20 is further provided with various memory, such as ROM 32, RAM 34 and user data memory 36. The operating system, graphical user interface and any data which is required therefor, such as icon images, and the like are stored in ROM 32. RAM 34 typically stores any software applications available on the device 20, as well as associated data. User data memory 36 stores data which is accessible by the user, such as contact data, messages, images, user settings data, and the like.
Software applications, typically stored in the ROM 32 or the RAM 34 within the mobile device, are often required to create, access and delete directories from the RAM 34 and the user data memory 36 on the device. In so doing, it is necessary for these software applications to interact with the filing system portion of the operating system. The details required by the software application to do this are provided within a series of Application Programming Interfaces (APIs).
Figures 2 and 3 illustrate a new method of assigning a directory name from an arbitrarily long original name. The method is implemented by a "creation" API.
Referring to Figures 2 and 3, when a new directory is requested programmatically (i.e. indirectly by the user, or by any software program) with an original name 1, it is allocated a directory name 2 before it is created in the filing system. The directory name 2 comprises a first portion 3 containing at least part of the original name I and a second portion 4 comprising an identifier. The identifier 4 may be, for example, a series of alphanumeric characters, a base-lO integer, a hexadecimal number, or a number derived from a new numbering system based on all legal directory and file characters in ascending ASCII I Unicode order.
As described by the first part of the flow chart in Figure 3, if the original name 1 of the newly requested directory is shorter than a predetermined length, then the identifier 4 is simply appended to the original name 1 to form the directory name 2. Otherwise, if the original name 1 is longer than the predetermined length, then the original name I is truncated to form the first portion 3, and the identifier 4 is appended to the first portion 3 to form the directory name 2 as before.
It should be noted that, although the name stored on the filing system will be the directory name 2, the original name 1 is retained on the recording medium so that it can be used by other software applications to access the directory. This will be explained further below, but it is important to be aware of this for the discussion that follows.
To avoid potential conflicts in the filing system, each original name I and each directory name 2 must be unique. Consequently, before a directory is created, a checking process is implemented to determine whether the original name 1 of the newly requested directory is unique and, if so, to ensure that its associated directory name 2 is also unique. As described in Figure 3, a check is first implemented to determine whether the first portion 3 of the newly requested directory name 2, i.e. the portion of the directory name 2 without the appended identifier 4, would be unique in the file system.
This is done by comparing the first portion 3 of the newly requested directory name 2 with the equivalent first portions 3 of all other existing directory names 2 present in the file system. If the first portion 3 of the newly requested directory name 2 is unique, then its full directory name 2, and its original name 1, must accordingly be unique and the new directory is created in the file system with the requested directory name 2.
When the new directory is created, the original name I of the newly created directory is stored in a dedicated file within that new directory. This file need not be visible to users, and preferably it is given a unique name which contains illegal' characters (that is, characters that are not permitted to be used by a user in the creation of a file or directory name: e.g. "name\\.txt") so that it is not accessible directly from other software applications. The file containing the original name us preferably only accessible to other software applications via a directory access API which contains instructions on how to access the file.
If the first (possibly truncated) portion 3 of the newly requested directory name is not unique, a secondary search process is implemented. This secondary search process is illustrated in more detail in Figure 4. As a result of the initial search process described above, a list of potential matches 15 will have been created containing the directory names 2a, 2b, 2c (for example) of those directories whose first portions 3a, 3b, 3c (for example) matched the first portion 3 of the newly requested directory name 2. As described above, when a new directory is created, its original name I is stored in a file on the recording medium. The secondary search process involves comparing the original name I of the newly requested directory with the original names I a, I b, 1 c (for example) of each potentially matching directory.
If the result of this comparison process indicates that the original name I of the newly requested directory is not unique, a "directory already exists" error is flagged. If the result of this comparison process indicates that the original name 1 of the newly requested directory is unique, then the identifier 4 appended to the first portion 3 is incremented to ensure that the directory name 2 is itself unique on the recording medium and the directory is created. Again, the original name 1 is stored as described previously.
This process allows the original name 1 of a newly requested directory to be of an arbitrary length, i.e. it is not restricted to any particular length. Of course, the amount of memory available in the relevant recording medium will provide an ultimate limit but this is not regarded as a limiting factor in a practical sense.
The length of the directory name may be 8 characters, 256 characters, or any other convenient number. Note that the predetermined length (which defines a "short" name) must be chosen to give sufficient space for the identifier 4.
A method of managing the directory created using the method described above is shown in Figure 5. In this case, a check is first made to determine whether the requested name of the directory to be accessed/deleted is longer or shorter than the predetermined length. If it is shorter than the predetermined length, a search is carried out to determine whether any existing directory names 2 have a first portion 3 which matches the requested name (this is referred to below as a "partial match"). If the requested name is longer than the predetermined length, then it is truncated to form a truncated version and a search is carried out to determine if there are any partial matches with this truncated version of the requested name.
Note that the identifier 4 is ignored in the search for partial matches, so that non-sequential directory names are not missed.
If this searching process does not return any partial matches, then an error alert is generated to indicate that the directory to be accessed/deleted does not exist. If, however, one or more partial matches are found, a secondary searching process is carried out. In this case, the full (untruncated) requested name is compared with the original name I of each of the potentially matching directories in turn, the original names I of the potentially matching directories being stored in particular files (e.g. name\.txt) on the recording medium as described previously. This is referred to below as a "full match". Once a full match is found, either access is given to the appropriate directory or it is deleted as required. Since only one existing directory should have an original name 1 which matches the requested name, no further comparison is made with any remaining partial matches.
So for example, if the user is trying to access "This is a very very long directory name", then the process of Figure 4 proceeds as follows: 1. Truncate the requested name to its short form, for example, the first 5 characters: "This 2. List the directories to locate any partial matches that start with "This" 1. "This 1" <-match 2. "This 2" <-match 3. "This 3" <-match 4. "Other name" <-not a match 3. Go into the directory associated with "This 1" and open the txt file and retrieve its contents 4. If the contents match "This is a very very long directory name", then this is the correct directory. If not, try "This 2", then "This 3", until a full match is found (or not).
The methods described with reference to Figures 2-5 allow the user, and software programs, to specify directory names of arbitrary length, instead of being limited to a particular length. Not only does this eliminate the need for checking for edge cases and handling them (if the name is too long), but it also relieves the users and software programs from having to choose names that may be too short for their purposes.
Furthermore, the implementation is completely hidden from all programs that use the directory APIs, so directories can be listed, worked with, etc, without the exposure of the user or programs to how this is implemented.
Various modifications may be made to the above described embodiments which are apparent to the person skilled in the art, to provide further embodiments, any and all of which are intended to be encompassed by the appended claims. a

Claims (17)

  1. Claims 1. A method of assigning a directory name, the method comprising: receiving an original name; determining whether the original name is greater than a threshold; and if the original name is greater than the threshold, then: assigning a truncated version of the original name as a first portion of the directory name; and assigning a identifier as a second portion of the directory name.
  2. 2. The method of claim 1 further comprising: if the original name is less than the threshold, then: assigning a full version of the original name as a first portion of the directory name; and assigning a identifier as a second portion of the directory name.
  3. 3. The method of claim I or 2 further comprising: determining whether the first portion of the directory name is unique; if the first portion of the directory name is not unique, then assigning the identifier to the directory name by incrementing a identifier assigned to a previous directory name; and if the first portion of the directory name is unique, then assigning a identifier to the directory name which is the same as a identifier assigned to a previous directory name.
  4. 4. The method of any preceding claim further comprising storing the original name in memory.
  5. 5. The method of any preceding claim further comprising creating a new directory associated with the assigned directory name.
  6. 6. The method of claim 4 and 5 wherein the original name is saved in the new directory.
  7. 7. The method of any preceding claim further comprising saving the original name in a file with a name including at least one illegal character.
  8. 8. The method of any preceding claim further comprising checking whether the original name is unique compared with a set of previously received original names; and issuing an error message if the original name is not unique.
  9. 9. A method of locating a directory name, the method comprising; receiving a request including a requested name; searching a plurality of directory names to identify one or more directory names which include a truncated version of the requested name; and in the event of the search identifying more than one directory name, locating the correct directory name by searching the original names associated with the identified directory names.
  10. 10. The method of claim 9, further comprising; determining whether the requested name is greater than a threshold; if the requested name is greater than the threshold, then searching the directory names to identify one or more directory names which include a truncated version of the requested name; and if the requested name is less than the threshold, then searching the directory names to identify one or more directory names which include the requested name.
  11. II. The method of claim 9 or 10 further comprising accessing or deleting a file which is contained in a directory associated with the identified directory name.
  12. 12. The method of any of claims 9 to 11 further comprising assigning the plurality of directory names by the method of any of claims 1 to 8.
  13. 13. A computer program or suite of computer programs so arranged such that when executed by a computer system it causes the computer system to operate in accordance with the method of any preceding claim.
  14. 14. A computer readable storage medium storing the computer program or at least one of the suite of computer programs according to claim 13.
  15. 15. Apparatus configured to operate in accordance with the method of any of claims 1 to 12.
  16. 16. A method substantially as hereinbefore described, with reference to Figure 3.
  17. 17. A method substantially as hereinbefore described, with reference to Figure 5.
GB0725211A 2007-12-24 2007-12-24 Assigning and locating directory names or file names for in a file system Withdrawn GB2455983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
GB0725211A GB2455983A (en) 2007-12-24 2007-12-24 Assigning and locating directory names or file names for in a file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GB0725211A GB2455983A (en) 2007-12-24 2007-12-24 Assigning and locating directory names or file names for in a file system

Publications (2)

Publication Number Publication Date
GB0725211D0 GB0725211D0 (en) 2008-02-06
GB2455983A true GB2455983A (en) 2009-07-01

Family

ID=39092358

Family Applications (1)

Application Number Title Priority Date Filing Date
GB0725211A Withdrawn GB2455983A (en) 2007-12-24 2007-12-24 Assigning and locating directory names or file names for in a file system

Country Status (1)

Country Link
GB (1) GB2455983A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5745902A (en) * 1992-07-06 1998-04-28 Microsoft Corporation Method and system for accessing a file using file names having different file name formats
US6249782B1 (en) * 1998-12-17 2001-06-19 Apple Computer, Inc. System and method for reducing file name length and for retrieving the reduced file name entitled files
US6286013B1 (en) * 1993-04-01 2001-09-04 Microsoft Corporation Method and system for providing a common name space for long and short file names in an operating system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5745902A (en) * 1992-07-06 1998-04-28 Microsoft Corporation Method and system for accessing a file using file names having different file name formats
US6286013B1 (en) * 1993-04-01 2001-09-04 Microsoft Corporation Method and system for providing a common name space for long and short file names in an operating system
US6249782B1 (en) * 1998-12-17 2001-06-19 Apple Computer, Inc. System and method for reducing file name length and for retrieving the reduced file name entitled files

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
W. R. STANEK, Microsoft TechNet, "Managing Files and Directories" [online] taken from "Windows NT Administrator's Pocket Consultant", published 1999, Microsoft Corporation. Available from http://technet.microsoft.com/en-gb/library/cc722482.aspx [Accessed 29 October 2008]. *

Also Published As

Publication number Publication date
GB0725211D0 (en) 2008-02-06

Similar Documents

Publication Publication Date Title
US10515052B2 (en) File system that supports both case sensitive and case insensitive directory lookup
US11899592B2 (en) Computer storage deduplication
US8201079B2 (en) Maintaining annotations for distributed and versioned files
JP3548197B2 (en) Multiple file name reference system
CA2445576C (en) Filter driver for identifying disk files by analysis of content
US5771381A (en) Method and system for adding configuration files for a user
US7200617B2 (en) Program for managing external storage, recording medium, management device, and computing system
US7610296B2 (en) Prioritized files
CN102629247B (en) Method, device and system for data processing
US7769779B2 (en) Reverse name mappings in restricted namespace environments
JP2010157204A (en) Content addressable storage system and method employing searchable block
JP2022500727A (en) Systems and methods for early removal of tombstone records in databases
EP1480132A2 (en) System and method for identifying and storing changes made to a table
JP2009522677A (en) Method, system, and device for file system dump / restore by node numbering
CN109033313B (en) Method and terminal equipment for realizing full-disk scanning function by using USN
WO2019005761A1 (en) Systems and methods of creation and deletion of tenants within a database
CN112115002A (en) Method and device for recovering file from damaged or non-trusted mechanical hard disk
US8086638B1 (en) File handle banking to provide non-disruptive migration of files
US20070073792A1 (en) System and method for removing residual data from memory
US20020169940A1 (en) System and method for using memory mapping to scan a master file table
US8073870B2 (en) Methods for storing data
KR101828466B1 (en) Method and apparatus for providing an object-based storage interface on the storage device based on file system
GB2455983A (en) Assigning and locating directory names or file names for in a file system
US9020995B2 (en) Hybrid relational, directory, and content query facility
US20030154221A1 (en) System and method for accessing file system entities

Legal Events

Date Code Title Description
COOA Change in applicant's name or ownership of the application

Owner name: NOKIA CORPORATION

Free format text: FORMER OWNER: SYMBIAN SOFTWARE LIMITED

WAP Application withdrawn, taken to be withdrawn or refused ** after publication under section 16(1)