Jump to content



Photo
- - - - -

How Works The File Command


  • Please log in to reply
3 replies to this topic

#1 Horrowind

Horrowind

    Newbie

  • Members
  • Pip
  • 29 posts
  • Gender:Male

  • Calculators:
    9860G SD
    9850GB+

Posted 04 April 2007 - 08:29 PM

hello
i want to make files on my storage memory or on my SD card.
How can i make this and how can test whether a file exsist?


#2 Menno

Menno

    Casio Freak

  • Members
  • PipPipPipPip
  • 184 posts
  • Gender:Male
  • Location:Netherlands

  • Calculators:
    Casio 880P
    Casio Graph 25+
    Casio fx-9860g sd

Posted 05 April 2007 - 03:40 AM

in basic or in c?

#3 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 05 April 2007 - 05:08 AM

Well, if we are talking about using C, I figured out how the file functions worked a while ago. Here was the thread: http://www.casiocalc...?showtopic=3168

It seems however the link is down right now, however here was the code for the demonstration:

/*
	File.c
	Demonstration of creating files and directories. 
	Contact: <u title="Email protected, replace "  AT  " by "@"">kucalc[i]  AT  [/i]gmail.com</u>
*/

#include "fxlib.h"

int AddIn_main(int isAppli, unsigned short OptionNum)
{
	FONTCHARACTER FileName[]={'\\','\\','f','l','s','0','\\','f','i','l','e','n','a','m','e','.','e','x','t',0};
	FONTCHARACTER DirName[]={'\\','\\','f','l','s','0','\\','d','i','r','n','a','m','e','.','e','x','t',0};
	unsigned int key;

	Bdisp_AllClr_DDVRAM();

	locate(1,4);
	Print((unsigned char*)"Press MENU");
	locate(1,5);
	Print((unsigned char*)"to exit and go to");
	locate(1,6);
	Print((unsigned char*)"MEMORY.");
	Bfile_CreateDirectory(DirName);
	Bfile_CreateFile(FileName, 500);

	while(1){
		GetKey(&key);
	}

	return 1;
}




//****************************************************************************
//**************											  ****************
//**************				 Notice!					  ****************
//**************											  ****************
//**************  Please do not change the following source.  ****************
//**************											  ****************
//****************************************************************************


#pragma section _BR_Size
unsigned long BR_Size;
#pragma section


#pragma section _TOP

//****************************************************************************
//  InitializeSystem
//
//  param   :   isAppli   : 1 = Application / 0 = eActivity
//			  OptionNum : Option Number (only eActivity)
//
//  retval  :   1 = No error / 0 = Error
//
//****************************************************************************
int InitializeSystem(int isAppli, unsigned short OptionNum)
{
	return INIT_ADDIN_APPLICATION(isAppli, OptionNum);
}

#pragma section


#4 Horrowind

Horrowind

    Newbie

  • Members
  • Pip
  • 29 posts
  • Gender:Male

  • Calculators:
    9860G SD
    9850GB+

Posted 09 April 2007 - 05:58 PM

thanks


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users