<commit_before>---
name: Titanium.Filesystem
summary: The top level filesystem module, used to access files and directories on the device.
extends: Titanium.Module
since: "0.1"
platforms: [android, iphone, ipad]
methods:
  - name: createTempDirectory
    summary: Creates a temporary directory and returns a [File](Titanium.Filesystem.File) object representing the new directory.
    returns:
        type: Titanium.Filesystem.File
  - name: createTempFile
    summary: Creates a temporary file and returns a [File](Titanium.Filesystem.File)
        object representing the new file.
    returns:
        type: Titanium.Filesystem.File
  - name: getFile
    summary: Returns a `File` object representing the file identified by the path
        arguments.
    description: |
        Note that `getFile` does not create a file if one does not exist at the specified
        path. It returns a new `File` object referring to the specified file path. The 
        application can create a file at that path by calling 
        [write](Titanium.Filesystem.File.write) or create a directory by calling
        [createDirectory](Titanium.Filesystem.File.createDirectory) on the `File` object.
        
        This method takes a variable number of arguments, where each argument is treated
        as a path component. All of the arguments are joined together using the
        platform-specific path separator to make the final path.
        
        If a relative path is passed, the full path should be interpreted relative
        to the current file. For example, if the file `Resources/login/login.js` 
        contains the following code:
        
            var icon = Titanium.Filesystem.getFile('icon.png');
        
        The path is interpreted as `Resources/login/icon.png`. 
        
        On iOS, all relative paths are currently interpreted as relative to the
        `Resources` directory, **not** to the current context. This is a known issue
        that will be addressed in a future release.

    returns:
        type: Titanium.Filesystem.File
    parameters:
      - name: path
        summary: One or more path components. Path arguments are joined together using 
            the platform specific path separator to form the full path.
        type: String
  - name: isExternalStoragePresent
    summary: Returns `true` if the device supports external storage *and* the external storage
        device is mounted.
    description: |
        Returns `true` on Android if an external storage device, such as an SD card, is
        available for reading and writing.

        Returns `false` on iOS.
    returns:
        type: Boolean
  - name: openStream
    summary: Opens file using the <Titanium.IOStream> interface.
    parameters:
      - name: mode
        summary: |
            Access mode. Either <Titanium.Stream.MODE_READ>, <Titanium.Stream.MODE_WRITE>, or 
            <Titanium.Stream. MODE_APPEND>.
        type: Number
        
      - name: path
        summary: |
            One or more path components. Path arguments are joined together using the 
            platform-specific path separator to form the full path. <commit_msg>[TIDOC-420] APIDoc: Bad link in Ti.Filesystem<commit_after>---
name: Titanium.Filesystem
summary: The top level filesystem module, used to access files and directories on the device.
extends: Titanium.Module
since: "0.1"
platforms: [android, iphone, ipad]
methods:
  - name: createTempDirectory
    summary: Creates a temporary directory and returns a [File](Titanium.Filesystem.File) object representing the new directory.
    returns:
        type: Titanium.Filesystem.File
  - name: createTempFile
    summary: Creates a temporary file and returns a [File](Titanium.Filesystem.File)
        object representing the new file.
    returns:
        type: Titanium.Filesystem.File
  - name: getFile
    summary: Returns a `File` object representing the file identified by the path
        arguments.
    description: |
        Note that `getFile` does not create a file if one does not exist at the specified
        path. It returns a new `File` object referring to the specified file path. The 
        application can create a file at that path by calling 
        [write](Titanium.Filesystem.File.write) or create a directory by calling
        [createDirectory](Titanium.Filesystem.File.createDirectory) on the `File` object.
        
        This method takes a variable number of arguments, where each argument is treated
        as a path component. All of the arguments are joined together using the
        platform-specific path separator to make the final path.
        
        If a relative path is passed, the full path should be interpreted relative
        to the current file. For example, if the file `Resources/login/login.js` 
        contains the following code:
        
            var icon = Titanium.Filesystem.getFile('icon.png');
        
        The path is interpreted as `Resources/login/icon.png`. 
        
        On iOS, all relative paths are currently interpreted as relative to the
        `Resources` directory, **not** to the current context. This is a known issue
        that will be addressed in a future release.

    returns:
        type: Titanium.Filesystem.File
    parameters:
      - name: path
        summary: One or more path components. Path arguments are joined together using 
            the platform specific path separator to form the full path.
        type: String
  - name: isExternalStoragePresent
    summary: Returns `true` if the device supports external storage *and* the external storage
        device is mounted.
    description: |
        Returns `true` on Android if an external storage device, such as an SD card, is
        available for reading and writing.

        Returns `false` on iOS.
    returns:
        type: Boolean
  - name: openStream
    summary: Opens file using the <Titanium.IOStream> interface.
    parameters:
      - name: mode
        summary: |
            Access mode. Either <Titanium.Filesystem.MODE_READ>, <Titanium.Filesystem.MODE_WRITE>, or 
            <Titanium.Filesystem.MODE_APPEND>.
        type: Number
        
      - name: path
        summary: |
            One or more path components. Path arguments are joined together using the 
            platform-specific path separator to form the full path. 
{'fraction_non_alphanumeric': 0.05937646874510418, 'fraction_numerical': 0.0010966630111232962, 'mean_word_length': 2.5486381322957197, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3819887', 'n_tokens_mistral': 1593, 'n_tokens_neox': 1549, 'n_words': 718}